﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Net.Mail;
 

namespace MShop.Core.Domain
{
    [MetadataType(typeof(EmailTemplate_Validation))]
    public partial class EmailTemplate
    {
        
    }


    internal sealed class EmailTemplate_Validation 
    {
        [Required(ErrorMessage = "主题不能为空")]     
        [DisplayName("邮件主题")]
        public string Subject { get; set; }

        [DisplayName("优先权")]
        [UIHint("MailPriority")]
        [EnumDataType(typeof(MailPriority))]
         public int Priority { get; set; }

        [DisplayName("实体类型")]
        public string EmailType { get; set; }

         [UIHint("EmailTag")]
        [DisplayName("邮件标签")]
        public string EmailTag { get; set; }

        [DisplayName("邮件说明")]
        public string EmailTips { get; set; }

        [DisplayName("模板内容")]
        [Required(ErrorMessage = "模板内容不能为空")]   
        [DataType(DataType.MultilineText)]
        public string TemplateValues { get; set; }
    }
}